memoview hide or delete a row
Hi
I'm new to fastreport and want to know how to hide certain MemoView when DataField have a null value or how to remove the line when the datafield has a null value. I would greatly appreciate your help.
Thank You
I'm new to fastreport and want to know how to hide certain MemoView when DataField have a null value or how to remove the line when the datafield has a null value. I would greatly appreciate your help.
Thank You
Comments
1. Set Report.EngineOptions.ConvertNulls := true
2. Modify your query a bit like select ..., if ThisField is null then 0 else 1 endif as ShowThisField
The second way seems (to me) more efficent as it does NOT change global EngineOptions for the whole report.
And when you have info about null or not null then use OnBeforePrint event for a band (where your memo is located) and set
Ad.1.
Memo1.Visible := (<ADOQuery."ThisField"> is null)
Ad.2.
Memo1.Visible := (<ADOQuery."ShowThisField"> = 1)
You can make the band not Visible in the same way
MasterData1.Visible := (and_here_one_of_the_above_conditions)
Mick